import { getOssInfo } from '@/api'
const actions = {
  setCurrentUrl: ({commit}, param) => {
    commit('setCurrentUrl', param)
  },
  setProductModel: ({commit}, param) => {
    commit('setProductModel', param)
  },
  setMenuName: ({commit}, param) => {
    commit('setMenuName', param)
  },
  setpathRoute: ({commit}, param) => {
    commit('setpathRoute', param)
  },
  changeLeftLayer: ({commit}) => {
    commit('changeLeftLayer')
  },
  setPcLogo: ({commit}, param) => {
    commit('setPcLogo', param)
  },
  setUserName: ({commit}, param) => {
    commit('setUserName', param)
  },
  setMenuList: ({commit}, param) => {
    commit('setMenuList', param)
  },
  setTopMenuList: ({commit}, param) => {
    commit('setTopMenuList', param)
  },
  setLeftLayerList: ({commit}, param) => {
    commit('setLeftLayerList', param)
  },
  setTagList: ({commit}, param) => {
    commit('setTagList', param)
  },
  setAreaLists: ({commit}, param) => {
    commit('setAreaLists', param)
  },
  currentTenantIdFn: ({commit}, param) => {
    commit('currentTenantIdFn', param)
  },
  currentUserIdFn: ({commit}, param) => {
    commit('currentUserIdFn', param)
  },
  currentSiteInfoFn: ({commit}, param) => {
    commit('setCurrentSiteInfo', param)
  },
  setSubMenus: ({commit}, param) => {
    commit('setSubMenus', param)
  },
  setCurrQaEditFakeId: ({commit}, param) => {
    commit('setCurrQaEditFakeId', param)
  },
  setOssInfo: ({commit}) => {
    getOssInfo().then(res => {
      if (res.data.code === 200) {
        let data = res.data.data
        if (data) {
          commit('setOssInfo', data)
        }
      }
    })
  }
}

export default actions
